package com.fengjing.launcher.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.SystemProperties;

import java.io.IOException;

/**
 * Created by wangjianqiang on 2017/12/25 13:56.
 * Package name com.fengjing.launcher.receiver
 */

public class StartMtpReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        SystemProperties.set("persist.sys.usb.config", "mtp,adb");
        try {
            Runtime.getRuntime().exec("reboot");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
